package com.niit.dao.impl;

import com.niit.dao.UserDao;
import com.niit.domain.User;
import com.niit.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @ProjectName: mybatis_demo
 * @Package: com.niit.dao.impl
 * @ClassName: UserDaoImpl
 * @Author: zjh
 * @description: TODO
 * @date: 2024/1/3 21:15
 * @version: 1.0
 */
public class UserDaoImpl implements UserDao {
    @Override
    public User selectById(Long id) {
        SqlSession sqlSession = MybatisUtil.getSqlSession();
        UserDao userDao = sqlSession.getMapper(UserDao.class);
        return userDao.selectById(id);
    }

    @Override
    public int insertUser(User user) {
        return 0;
    }

    @Override
    public List<User> selectByUser(User user) {
        return null;
    }
}
